<!--<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="/www/js/jquery.min.js"></script>
        <script>
            function CheckUserInfo(){
                var username=$('#username').val();
                if(username==''){
                    alert('请输入用户名');
                    return false;
                }
                var passwd=$('#passwd').val();
                if(passwd==''){
                    alert('请输入密码');
                    return false;
                }
            }
        </script>
    </head>
    <body>
        <form name="form1" action="index.php?s=User/checkUser" method="post" onsubmit="return CheckUserInfo();">
            <div><input type="text" name="username" id="username"></div>
            <div><input type="password" name="passwd" id="passwd"></div>
            <div><input type="submit" name="btn" id="btn" value="登录"></div>
        </form>
    </body>
</html>-->
<html class="login_page">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>供应商管理</title>
    
        <!-- Bootstrap framework -->
            <link rel="stylesheet" href="/www/css/bootstrap.min.css"  />
            <link rel="stylesheet" href="/www/css/bootstrap-responsive.min.css"  />
        <!-- theme color-->
            <link rel="stylesheet" href="/www/css/blue.css"  />
        <!-- tooltip -->    
            <link rel="stylesheet" href="/www/lib/qtip2/jquery.qtip.min.css"  />
        <!-- main styles -->
            <link rel="stylesheet" href="/www/css/style.css"  />
    
        <!-- favicon -->
            <link rel="shortcut icon" href="favicon.ico" />
    
        <!--<link href="../../fonts.googleapis.com/css-family=PT+Sans.css"  rel='stylesheet' type='text/css'>-->
    
        <!--[if lt IE 9]>
            <script src="js/ie/html5.js" ></script>
            <script src="js/ie/respond.min.js" ></script>
        <![endif]-->
        
    </head>
    <body>
        
        <div class="login_box">
            
            <form action="index.php?s=User/checkUser" method="post" id="login_form">
                <div class="top_b">供应商管理中心</div>    
                <div class="alert alert-info alert-login">
                    请输入用户名和密码.
                </div>
                <div class="cnt_b">
                    <div class="formRow">
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-user"></i></span><input type="text" id="username" name="username" placeholder="Username" value="" />
                        </div>
                    </div>
                    <div class="formRow">
                        <div class="input-prepend">
                            <span class="add-on"><i class="icon-lock"></i></span><input type="password" id="password" name="passwd" placeholder="Password" value="" />
                        </div>
                    </div>
                    <!--<div class="formRow clearfix">
                        <label class="checkbox"><input type="checkbox" /> Remember me</label>
                    </div>-->
                </div>
                <div class="btm_b clearfix">
                    <button class="btn btn-inverse pull-right" type="submit">登 录</button>
                    <!--<span class="link_reg"><a href="#reg_form">Not registered? Sign up here</a></span>-->
                </div>  
            </form>
            <!--<div class="links_b links_btm clearfix">
                <span class="linkform"><a href="#pass_form">Forgot password?</a></span>
                <span class="linkform" style="display:none">Never mind, <a href="#login_form">send me back to the sign-in screen</a></span>
            </div>-->
            
        </div>
         
        <script src="/www/js/jquery.min.js" ></script>
        <script src="/www/js/jquery.actual.min.js" ></script>
        <script src="/www/lib/validation/jquery.validate.js" ></script>
        <script src="/www/bootstrap/js/bootstrap.min.js" ></script>
        <script>
            $(document).ready(function(){
                
                //* boxes animation
                form_wrapper = $('.login_box');
                function boxHeight() {
                    form_wrapper.animate({ marginTop : ( - ( form_wrapper.height() / 2) - 24) },400);   
                };
                form_wrapper.css({ marginTop : ( - ( form_wrapper.height() / 2) - 24) });
                $('.linkform a,.link_reg a').on('click',function(e){
                    var target  = $(this).attr('href'),
                        target_height = $(target).actual('height');
                    $(form_wrapper).css({
                        'height'        : form_wrapper.height()
                    }); 
                    $(form_wrapper.find('form:visible')).fadeOut(400,function(){
                        form_wrapper.stop().animate({
                            height   : target_height,
                            marginTop: ( - (target_height/2) - 24)
                        },500,function(){
                            $(target).fadeIn(400);
                            $('.links_btm .linkform').toggle();
                            $(form_wrapper).css({
                                'height'        : ''
                            }); 
                        });
                    });
                    e.preventDefault();
                });
                
                //* validation
                $('#login_form').validate({
                    onkeyup: false,
                    errorClass: 'error',
                    validClass: 'valid',
                    rules: {
                        username: { required: true, minlength: 3 },
                        password: { required: true, minlength: 3 }
                    },
                    highlight: function(element) {
                        $(element).closest('div').addClass("f_error");
                        setTimeout(function() {
                            boxHeight()
                        }, 200)
                    },
                    unhighlight: function(element) {
                        $(element).closest('div').removeClass("f_error");
                        setTimeout(function() {
                            boxHeight()
                        }, 200)
                    },
                    errorPlacement: function(error, element) {
                        $(element).closest('div').append(error);
                    }
                });
            });
        </script>
        
        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-32339645-1']);
            _gaq.push(['_trackPageview']);
          
            (function() {
              var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
              ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
              var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();
          
          </script>
            
    </body>
</html>
